package com.eatrip.service.implementation;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.eatrip.bean.Tipologia;
import com.eatrip.dao.TipologiaDAO;
import com.eatrip.service.TipologiaService;

@Service
public class TipologiaServiceImple implements TipologiaService {

	@Autowired
	private TipologiaDAO tipologiaDAO;
	
	@Override
	@Transactional(readOnly = true)
	public Tipologia getTipologia(int idTipologia) {
		return tipologiaDAO.getTipologia(idTipologia);
	}

	@Override
	@Transactional(readOnly = false)
	public void insertTipologia(Tipologia tipologia) {
		tipologiaDAO.insertTipologia(tipologia);
	}

}
